import rxAjax from '@/assets/js/ajax.js';

//考勤请假单 api接口
export const AtsHolidayApi = {};

AtsHolidayApi.baseUrl= '/api-oa/oa/ats/atsHoliday';
AtsHolidayApi.exportUrl= AtsHolidayApi.baseUrl + '/listExport';

//查询列表
AtsHolidayApi.query=function (parameter) {
  var url= AtsHolidayApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
AtsHolidayApi.get =function(pkId) {
  var url= AtsHolidayApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
AtsHolidayApi.save =function(parameter) {
  var url= AtsHolidayApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
AtsHolidayApi.del =function(parameter) {
  var url= AtsHolidayApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default AtsHolidayApi;

